package top.yokey.learn2;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import top.yokey.learn2.activity.MainActivity;

public class BroadCastReceiver extends BroadcastReceiver {

    //ctrl + o
    @Override
    public void onReceive(Context context, Intent intent) {
        Log.i("TAG", "userClick:我被点击啦！！！ ");
        Intent newIntent = new Intent(context,
                MainActivity.class)
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(newIntent);
    }
}
